package com.web.cms.ad.model;

import com.blue.core.dict.AdvType;
import com.blue.core.dict.State;
import com.blue.jdbc.annotation.Id;
import com.blue.jdbc.annotation.Must;
import com.blue.jdbc.annotation.Table;
import com.blue.jdbc.annotation.Transient;

import java.util.Date;

/**
 * 广告实体类
 * 
 * @author 代码由 blue-code 框架生成
 * @since 1.0 2017年11月13日
 */
@Table(name = "ad_adv")
public class Adv
{
	@Id
	private Integer id; // 编号
	private Integer webId; // 网站编号
	private Integer posId; // 位置编号
	private String name; // 名称
	private String content; // 内容
	private String url; // 链接
	private String descp; // 描述
	@Must
	private Date startTime; // 开始生效时间
	@Must
	private Date endTime; // 结束生效时间
	private Date createTime; // 创建时间
	private Integer clicks; // 点击次数
	private State state; // 状态：0正常，1作废
	private Integer sort; // 排序

	@Transient
	private String posCode; // 位置代码
	@Transient
	private String posName; // 位置名称
	@Transient
	private AdvType posType; // 位置类型
	@Transient
	private String webCode; // 网站代码
	
	public Adv()
	{
	}

	public String getWebIdPosCode()
	{
		return webId + "_" + posCode;
	}

	public String getWebCodePosCode()
	{
		return webCode + "_" + posCode;
	}
	
	public Integer getId()
	{
		return this.id;
	}
	
	public void setId(Integer id)
	{
		this.id = id;
	}
	
	public Integer getWebId()
	{
		return this.webId;
	}
	
	public void setWebId(Integer webId)
	{
		this.webId = webId;
	}
	
	public Integer getPosId()
	{
		return this.posId;
	}
	
	public void setPosId(Integer posId)
	{
		this.posId = posId;
	}
	
	public String getName()
	{
		return this.name;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}
	
	public String getContent()
	{
		return this.content;
	}
	
	public void setContent(String content)
	{
		this.content = content;
	}
	
	public String getUrl()
	{
		return this.url;
	}
	
	public void setUrl(String url)
	{
		this.url = url;
	}
	
	public String getDescp()
	{
		return this.descp;
	}
	
	public void setDescp(String descp)
	{
		this.descp = descp;
	}
	
	public Date getStartTime()
	{
		return this.startTime;
	}
	
	public void setStartTime(Date startTime)
	{
		this.startTime = startTime;
	}
	
	public Date getEndTime()
	{
		return this.endTime;
	}
	
	public void setEndTime(Date endTime)
	{
		this.endTime = endTime;
	}
	
	public Date getCreateTime()
	{
		return this.createTime;
	}
	
	public void setCreateTime(Date createTime)
	{
		this.createTime = createTime;
	}
	
	public Integer getClicks()
	{
		return this.clicks;
	}
	
	public void setClicks(Integer clicks)
	{
		this.clicks = clicks;
	}
	
	public State getState()
	{
		return this.state;
	}
	
	public void setState(State state)
	{
		this.state = state;
	}
	
	public Integer getSort()
	{
		return this.sort;
	}
	
	public void setSort(Integer sort)
	{
		this.sort = sort;
	}

	public String getPosCode()
	{
		return posCode;
	}

	public void setPosCode(String posCode)
	{
		this.posCode = posCode;
	}

	public String getPosName()
	{
		return posName;
	}

	public void setPosName(String posName)
	{
		this.posName = posName;
	}

	public AdvType getPosType()
	{
		return posType;
	}

	public void setPosType(AdvType posType)
	{
		this.posType = posType;
	}

	public String getWebCode()
	{
		return webCode;
	}

	public void setWebCode(String webCode)
	{
		this.webCode = webCode;
	}

}
